<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <meta name="keyword" content="">
    <!-- <link rel="shortcut icon" href="img/favicon.png"> -->
    <title>微信jssdk测试</title>
    <!-- <link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css"> -->
    <link rel="stylesheet" href="//cdn.bootcss.com/weui/1.1.2/style/weui.min.css">
    <link rel="stylesheet" href="//cdn.bootcss.com/animate.css/3.5.2/animate.min.css">
    <link rel="stylesheet" href="css/style.css">
    <link rel="stylesheet" href="css/wxtest.css">
</head>

<body>
    <div id="app" class="page">
        <div class="weui-panel">
            <div class="weui-panel__hd">任务列表</div>
            <tasklist :data-list="tasks" :loading="busy" :next-page="hasMore" @load-more="queryTasks" @refresh="reload" class="weui-panel__bd"></tasklist>
        </div>
        <div class="weui-footer">
            <p class="weui-footer__text" v-html="copyright"></p>
        </div>
        <!-- alert -->
        <div class="dialogs">
            <div :class="dialog.alert.show?'show':''" class="js_dialog">
                <div class="weui-mask"></div>
                <div class="weui-dialog">
                    <div class="weui-dialog__bd" v-text="dialog.alert.msg"></div>
                    <div class="weui-dialog__ft">
                        <a href="javascript:;" @click="dialog.alert.show=false" class="weui-dialog__btn weui-dialog__btn_primary">知道了</a>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- task list template -->
    <template id="tasklist-tpl">
        <div>
            <div v-if="" v-for="(item, index) in dataList" class="weui-media-box weui-media-box_text" @click="showview(item)">
                <a :href="'task.detail.html?id=' + item.id" class="weui-btn weui-btn_mini weui-btn_primary">执行</a>
                <h4 class="weui-media-box__title">{{item.name}}</h4>
                <p class="weui-media-box__desc">计划完成时间：{{item.doneTime}}</p>
                <p class="weui-media-box__desc">任务类型：{{item.type|transType}}</p>
            </div>
            <div v-if="loading" class="weui-loadmore">
                <i class="weui-loading"></i>
                <span class="weui-loadmore__tips">正在加载</span>
            </div>
            <div v-if="!dataList || !dataList.length" class="weui-loadmore weui-loadmore_line">
                <span class="weui-loadmore__tips">暂无数据</span>
            </div>
            <div v-if="!nextPage" class="weui-loadmore weui-loadmore_line weui-loadmore_dot">
                <div class="weui-loadmore__tips"></div>
            </div>
            <div v-if="dataList && dataList.length && nextPage" class="pd-15">
                <button class="weui-btn weui-btn_default" :class="loading ? 'weui-btn_disabled' : ''" :disabled="loading" @click="loadMore()">加载更多</button>
            </div>
        </div>
    </template>
    <script src="//cdn.bootcss.com/require.js/2.3.4/require.min.js" data-main="js/wxtest.js"></script>
    <script src="js/require.config.js"></script>
</body>

</html>
